import java.util.ArrayDeque;
import java.util.Scanner;

public class Test0501 {

    public static void main1(String[] args) {
        ArrayDeque deque = new ArrayDeque();

        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String name = scanner.next();
            // 初始化队列中的数据
            deque.offerLast(name);
        }
        while(deque.size()>=2){
            System.out.println(deque.removeFirst());
            System.out.println(deque.removeFirst());
        }
        while(deque.size()>0){
            System.out.println(deque.removeFirst());
        }

    }

    public static void main(String[] args) {
        System.out.println("hhh");
    }

}
